package com.huaxia.exception;

import com.huaxia.constant.ResultConstant;

/**
 * Created by lizhenqiang on 2018/5/12.
 * 业务异常
 */
public class BusiException extends  RuntimeException {
    private Integer code= ResultConstant.OPS_FAILED_CODE;
    private String msg=ResultConstant.OPS_FAILED_MSG;

    public BusiException() {
        this.code = code;
        this.msg = msg;
    }
    public BusiException(Integer code, String msg) {
        super(msg);
        this.code = code;
        this.msg = msg;
    }

    public BusiException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public BusiException(Integer code) {
        super(ResultConstant.OPS_FAILED_MSG);
        this.code = code;
    }
    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
